#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QThread>
#include "painter.h"
#include <QScrollArea>

namespace Ui {
class MainWindow;
}

class WorkThread :public QThread
{
    Q_OBJECT
protected:
    void run();
};

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
private slots:
    void on_pushButton_clicked();
    void on_btnReadFile_clicked();
    void on_btnThread_clicked();

private:
    Ui::MainWindow *ui;

    QWidget* pw;
    QScrollArea* scroll;
    Painter* pter;
    WorkThread* pthread;
};

#endif // MAINWINDOW_H
